<template>
  <div>
    <!-- 未勾选 -->
    <el-card class="box-card" :hidden="importDataType == '软磁性能' || importDataType == '永磁性能' || importDataType == '导电性能'">
      请勾选上表数据 </el-card>
    <!-- 软磁 -->
    <el-card class="box-card" style="margin-top: 10px" v-if="importDataType == '软磁性能'">
      <div slot="header">
        <span style="color:#4e9efd;font-size:17px;">测量条件</span>
      </div>
      <el-card class="box-card">
        <div slot="header">
          <span>数据类型</span>
        </div>
        <a-row :gutter="24" style="margin-bottom: 5px">
          <a-col :sm="24" :md="12" :xl="6">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="0" border
              @change="judge('原始波形', '静态', 0)">静态原始波形 : {{ conditionNum.静态原始波形 }}</el-radio>
          </a-col>
          <a-col :sm="24" :md="12" :xl="6">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="1" border
              @change="judge('磁化曲线', '静态', 1)">静态磁化曲线 : {{ conditionNum.静态磁化曲线 }}</el-radio>
          </a-col>
          <a-col :sm="24" :md="12" :xl="6">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="2" border
              @change="judge('磁滞回线', '静态', 2)">静态磁滞回线 : {{ conditionNum.静态磁滞曲线 }}</el-radio>
          </a-col>
          <a-col :sm="24" :md="12" :xl="6">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="3" border
              @change="judge('铁损曲线', '静态', 3)">静态铁损曲线 : {{ conditionNum.静态铁损曲线 }}</el-radio>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :sm="24" :md="12" :xl="6">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="4" border
              @change="judge('原始波形', '动态', 4)">动态原始波形 : {{ conditionNum.动态原始波形 }}</el-radio>
          </a-col>
          <a-col :sm="24" :md="12" :xl="6">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="5" border
              @change="judge('磁化曲线', '动态', 5)">动态磁化曲线 : {{ conditionNum.动态磁化曲线 }}</el-radio>
          </a-col>
          <a-col :sm="24" :md="12" :xl="6">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="6" border
              @change="judge('磁滞回线', '动态', 6)">动态磁滞回线 : {{ conditionNum.动态磁滞曲线 }}</el-radio>
          </a-col>
          <a-col :sm="24" :md="12" :xl="6">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="7" border
              @change="judge('铁损曲线', '动态', 7)">动态铁损曲线 : {{ conditionNum.动态铁损曲线 }}</el-radio>
          </a-col>
        </a-row>
      </el-card>
      <el-card class="box-card" style="margin-top: 3px">
        <el-row :gutter="20">
          <el-col :span="2"><el-button type="primary" size="mini" style="width:100px"
              @click="hideSelect">隐藏选中数据</el-button> </el-col>
          <el-col :span="2"><el-button type="primary" size="mini" style="width:100px" @click="showAll">全部显示</el-button>
          </el-col>
          <!-- <el-col :span="2"><el-button type="primary" size="mini" style="width:100px" :disabled="exportMeaCondFlag" @click="exportMeaCond">导出测量条件</el-button> </el-col> -->
        </el-row>

        <!-- 静态原始波形 -->
        <u-table use-virtual :row-height="rowHeight" ref="measureTable0" v-show="tableVisiable[0]"
          :data="measuConditionsData" @sort-change="getSortChange" :default-sort="sortRule" border height="500px"
          style="margin-top: 10px" @selection-change="getEchartsLegend">
          <u-table-column type="selection" width="55"> </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[0] == 1" label="裁剪角度/Deg." width="150px"
            id="cuttingAngle" prop="cuttingAngle" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[1] == 1" label="频率/Hz" width="100px"
            align="center" id="frequency" prop="frequency" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[2] == 1" label="温度/Cel.Deg" width="130px"
            id="temperature" prop="temperature" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[3] == 1" label="直流磁密/T" width="120px"
            prop="dcMagneticDensity" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[4] == 1" label="交流磁密/T" width="120px"
            prop="acMagneticDensity" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[5] == 1" label="直流磁场/(A/m)" width="160px"
            prop="dcMagneticField" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[6] == 1" label="交流磁场/(A/m)" width="160px"
            prop="acMagneticField" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[7] == 1" label="有无护套" width="120px"
            prop="sheath" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[8] == 1" label="叠压方向应力/MPa" width="180px"
            prop="overlyingStress" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[9] == 1" label="平行应力/MPa" width="140px"
            prop="parallelStress" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[10] == 1" label="消除应力退火" width="140px"
            prop="stressReliefAnnealing" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[11] == 1" label="损耗/(J/kg)" width="140px"
            align="center" prop="wastage" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[12] == 1" label="最大磁密/T" width="140px"
            align="center" prop="maximumFluxDensity" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[13] == 1" label="最大磁场/(A/m)" width="160px"
            align="center" prop="maximumMagneticField" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[14] == 1" label="最小磁密/T" width="140px"
            align="center" prop="minimumFluxDensity" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[15] == 1" label="最小磁场/(A/m)" width="160px"
            align="center" prop="minimumMagneticField" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[16] == 1" label="测量标准" width="120px"
            align="center" prop="standard" show-overflow-tooltip>
            <template slot-scope="scope">
              <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{
                scope.row.standard }}</el-button>
            </template>
          </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[17] == 1" label="测试员" width="100px"
            align="center" prop="testControler" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[18] == 1" label="测量日期" width="120px"
            align="center" prop="testDate" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[19] == 1" label="备注" width="100px"
            align="center" prop="remarks" show-overflow-tooltip></u-table-column>
          <u-table-column v-show="conditionList.visableList[20] == 1" label="文件名" width="100px" align="center"
            prop="fileName" show-overflow-tooltip></u-table-column>
          <u-table-column align="center" fixed="right" label="操作" width="200px">
            <template slot-scope="scope">
              <el-button @click="collect(scope.row)" size="mini" type="primary" plain>收藏</el-button>
              <el-divider direction="vertical"></el-divider>
              <el-button @click="echartsdownload(scope.row)" size="mini" type="primary" plain>下载测试报告</el-button>
            </template>
          </u-table-column>
        </u-table>

        <!-- 静态磁化曲线 -->
        <u-table use-virtual :row-height="rowHeight" ref="measureTable1" v-show="tableVisiable[1]"
          :data="measuConditionsData" @sort-change="getSortChange" :default-sort="sortRule" border height="500px"
          style="margin-top: 10px" @selection-change="getEchartsLegend">
          <u-table-column type="selection" width="55"> </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[0] == 1" label="裁剪角度/Deg." width="140px"
            prop="cuttingAngle" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[1] == 1" align="center" label="频率/Hz"
            width="100px" prop="frequency" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[2] == 1" label="温度/Cel.Deg" width="140px"
            prop="temperature" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[3] == 1" label="最大磁密/T" width="120px"
            prop="maximumFluxDensity" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[4] == 1" label="最大磁场/(A/m)" width="160px"
            prop="maximumMagneticField" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[5] == 1" label="最小磁密/T" width="120px"
            prop="minimumFluxDensity" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[6] == 1" label="最小磁场/(A/m)" width="160px"
            prop="minimumMagneticField" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[7] == 1" label="有无护套" width="120px"
            prop="sheath" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[8] == 1" label="叠压方向应力/MPa" width="180px"
            prop="overlyingStress" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[9] == 1" label="平行应力/MPa" width="140px"
            prop="parallelStress" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[10] == 1" label="消除应力退火" width="140px"
            align="center" prop="stressReliefAnnealing" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[11] == 1" align="center" label="测量标准"
            width="120px" prop="standard" show-overflow-tooltip>
            <template slot-scope="scope">
              <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{
                scope.row.standard }}</el-button>
            </template>
          </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[12] == 1" align="center" label="测试员"
            width="100px" prop="testControler" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[13] == 1" align="center" label="测量日期"
            width="120px" prop="testDate" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[14] == 1" align="center" label="备注"
            width="100px" prop="remarks" show-overflow-tooltip></u-table-column>
          <u-table-column v-show="conditionList.visableList[15] == 1" align="center" label="文件名" width="100px"
            prop="fileName" show-overflow-tooltip></u-table-column>
          <u-table-column align="center" fixed="right" label="操作" width="200px">
            <template slot-scope="scope">
              <el-button @click="collect(scope.row)" size="mini" type="primary" plain>收藏</el-button>
              <el-divider direction="vertical"></el-divider>
              <el-button @click="echartsdownload(scope.row)" size="mini" type="primary" plain>下载测试报告</el-button>
            </template>
          </u-table-column>
        </u-table>

        <!-- 静态磁滞回线线 -->
        <u-table use-virtual :row-height="rowHeight" ref="measureTable2" v-show="tableVisiable[2]"
          :data="measuConditionsData" @sort-change="getSortChange" :default-sort="sortRule" border height="500px"
          style="margin-top: 10px" @selection-change="getEchartsLegend">
          <u-table-column type="selection" width="55"> </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[0] == 1" label="裁剪角度/Deg." width="140px"
            prop="cuttingAngle" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[1] == 1" label="频率/Hz" width="100px"
            align="center" prop="frequency" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[2] == 1" label="温度/Cel.Deg" width="140px"
            prop="temperature" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[3] == 1" label="直流磁密/T" width="120px"
            prop="dcMagneticDensity" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[4] == 1" label="交流磁密/T" width="120px"
            prop="acMagneticDensity" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[5] == 1" label="直流磁场/(A/m)" width="160px"
            prop="dcMagneticField" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[6] == 1" label="交流磁场/(A/m)" width="160px"
            prop="acMagneticField" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[7] == 1" label="有无护套" width="160px"
            prop="sheath" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[8] == 1" label="叠压方向应力/MPa" width="180px"
            prop="overlyingStress" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[9] == 1" label="平行应力/MPa" width="140px"
            prop="parallelStress" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[10] == 1" label="消除应力退火" width="140px"
            prop="stressReliefAnnealing" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[11] == 1" label="损耗/(J/kg)" width="140px"
            align="center" prop="wastage" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[12] == 1" label="最大磁密/T" width="140px"
            align="center" prop="maximumFluxDensity" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[13] == 1" label="最大磁场/(A/m)" width="160px"
            align="center" prop="maximumMagneticField" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[14] == 1" label="最小磁密/T" width="140px"
            align="center" prop="minimumFluxDensity" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[15] == 1" label="最小磁场/(A/m)" width="160px"
            align="center" prop="minimumMagneticField" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[16] == 1" label="测量标准" width="120px"
            align="center" prop="standard" show-overflow-tooltip>
            <template slot-scope="scope">
              <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{
                scope.row.standard }}</el-button>
            </template>
          </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[17] == 1" label="测试员" width="100px"
            align="center" prop="testControler" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[18] == 1" label="测量日期" width="120px"
            align="center" prop="testDate" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[19] == 1" label="备注" width="100px"
            align="center" prop="remarks" show-overflow-tooltip></u-table-column>
          <u-table-column v-show="conditionList.visableList[20] == 1" label="文件名" width="100px" align="center"
            prop="fileName" show-overflow-tooltip></u-table-column>
          <u-table-column align="center" fixed="right" label="操作" width="200px">
            <template slot-scope="scope">
              <el-button @click="collect(scope.row)" size="mini" type="primary" plain>收藏</el-button>
              <el-divider direction="vertical"></el-divider>
              <el-button @click="echartsdownload(scope.row)" size="mini" type="primary" plain>下载测试报告</el-button>
            </template>
          </u-table-column>
        </u-table>

        <!-- 静态铁损曲线 -->
        <u-table use-virtual :row-height="rowHeight" ref="measureTable3" v-show="tableVisiable[3]"
          :data="measuConditionsData" @sort-change="getSortChange" :default-sort="sortRule" border height="500px"
          style="margin-top: 10px" @selection-change="getEchartsLegend">
          <u-table-column type="selection" width="55"> </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[0] == 1" label="裁剪角度/Deg." width="140px"
            prop="cuttingAngle" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[1] == 1" label="频率/Hz" width="100px"
            align="center" prop="frequency" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[2] == 1" label="温度/Cel.Deg." width="140px"
            align="center" prop="temperature" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[3] == 1" label="最大铁损/(J/kg)" width="160px"
            prop="maximumIronLoss" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[4] == 1" label="最大磁密/T" width="120px"
            prop="maximumFluxDensity" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[5] == 1" label="最小铁损/(J/kg)" width="160px"
            prop="minimumIronLoss" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[6] == 1" label="最小磁密/T" width="120px"
            prop="minimumFluxDensity" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[7] == 1" label="有无护套" width="120px"
            prop="sheath" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[8] == 1" label="叠压方向应力/MPa" width="180px"
            prop="overlyingStress" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[9] == 1" label="平行应力/MPa" width="140px"
            prop="parallelStress" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[10] == 1" label="消除应力退火" width="140px"
            align="center" prop="stressReliefAnnealing" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[11] == 1" label="测量标准" width="120px"
            align="center" prop="standard" show-overflow-tooltip>
            <template slot-scope="scope">
              <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{
                scope.row.standard }}</el-button>
            </template>
          </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[12] == 1" label="测试员" width="100px"
            align="center" prop="testControler" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[13] == 1" label="测量日期" width="120px"
            align="center" prop="testDate" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[14] == 1" label="备注" width="100px"
            align="center" prop="remarks" show-overflow-tooltip></u-table-column>
          <u-table-column v-show="conditionList.visableList[15] == 1" label="文件名" width="100px" align="center"
            prop="fileName" show-overflow-tooltip></u-table-column>
          <u-table-column align="center" fixed="right" label="操作" width="200px">
            <template slot-scope="scope">
              <el-button @click="collect(scope.row)" size="mini" type="primary" plain>收藏</el-button>
              <el-divider direction="vertical"></el-divider>
              <el-button @click="echartsdownload(scope.row)" size="mini" type="primary" plain>下载测试报告</el-button>
            </template>
          </u-table-column>
        </u-table>

        <!-- 动态原始波形 -->
        <u-table use-virtual :row-height="rowHeight" ref="measureTable4" v-show="tableVisiable[4]"
          :data="measuConditionsData" @sort-change="getSortChange" :default-sort="sortRule" border height="500px"
          style="margin-top: 10px" @selection-change="getEchartsLegend">
          <u-table-column type="selection" width="55"> </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[0]" label="裁剪角度/Deg." width="140px"
            prop="cuttingAngle" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[1] == 1" align="center" label="频率/Hz"
            width="100px" prop="frequency" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[2] == 1" label="温度/Cel.Deg" width="140px"
            prop="temperature" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[3] == 1" label="直流磁密/T" width="120px"
            prop="dcMagneticDensity" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[4] == 1" label="交流磁密/T" width="120px"
            prop="acMagneticDensity" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[5] == 1" label="直流磁场/(A/m)" width="150px"
            prop="dcMagneticField" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[6] == 1" label="交流磁场/(A/m)" width="150px"
            prop="acMagneticField" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[7] == 1" label="有无护套" width="120px"
            prop="sheath" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[8] == 1" label="叠压方向应力/MPa" width="180px"
            prop="overlyingStress" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[9] == 1" label="平行应力/MPa" width="140px"
            prop="parallelStress" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[10] == 1" label="消除应力退火" width="140px"
            prop="stressReliefAnnealing" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[11] == 1" label="损耗/(W/kg)" width="130px"
            align="center" prop="wastage" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[12] == 1" label="视在功率(VA/kg)" width="160px"
            prop="apparentPower" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[13] == 1" label="电势波形因子" width="135px"
            align="center" prop="potentialFactor" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[14] == 1" align="center" label="最大磁密/T"
            width="120px" prop="maximumFluxDensity" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[15] == 1" align="center" label="最大磁场/(A/m)"
            width="150px" prop="maximumMagneticField" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[16] == 1" align="center" label="最小磁密/T"
            width="120px" prop="minimumFluxDensity" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[17] == 1" align="center" label="最小磁场/(A/m)"
            width="150px" prop="minimumMagneticField" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[18] == 1" align="center" label="测量标准"
            width="120px" prop="standard" show-overflow-tooltip>
            <template slot-scope="scope">
              <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{
                scope.row.standard }}</el-button>
            </template>
          </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[19] == 1" align="center" label="测试员"
            width="100px" prop="testControler" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[20] == 1" align="center" label="测量日期"
            width="120px" prop="testDate" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[21] == 1" align="center" label="备注"
            width="100px" prop="remarks" show-overflow-tooltip></u-table-column>
          <u-table-column v-show="conditionList.visableList[22] == 1" align="center" label="文件名" width="100px"
            prop="fileName" show-overflow-tooltip></u-table-column>
          <u-table-column align="center" fixed="right" label="操作" width="200px">
            <template slot-scope="scope">
              <el-button @click="collect(scope.row)" size="mini" type="primary" plain>收藏</el-button>
              <el-divider direction="vertical"></el-divider>
              <el-button @click="echartsdownload(scope.row)" size="mini" type="primary" plain>下载测试报告</el-button>
            </template>
          </u-table-column>
        </u-table>

        <!-- 动态磁化曲线 -->
        <u-table use-virtual :row-height="rowHeight" ref="measureTable5" v-show="tableVisiable[5]"
          :data="measuConditionsData" @sort-change="getSortChange" :default-sort="sortRule" border height="500px"
          style="margin-top: 10px" @selection-change="getEchartsLegend">
          <u-table-column type="selection" width="55"> </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[0] == 1" label="裁剪角度/Deg." width="140px"
            prop="cuttingAngle" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[1] == 1" align="center" width="100px"
            label="频率/Hz" prop="frequency" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[2] == 1" label="温度/Cel.Deg" width="140px"
            prop="temperature" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[3] == 1" label="直流磁密/T" width="140px"
            prop="dcMagneticDensity" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[4] == 1" label="最大磁密/T" width="140px"
            prop="maximumFluxDensity" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[5] == 1" label="最大磁场/(A/m)" width="160px"
            prop="maximumMagneticField" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[6] == 1" label="最小磁密/T" width="140px"
            prop="minimumFluxDensity" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[7] == 1" label="最小磁场/(A/m)" width="160px"
            prop="minimumMagneticField" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[8] == 1" label="有无护套" width="160px"
            prop="sheath" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[9] == 1" label="叠压方向应力/MPa" width="180px"
            prop="overlyingStress" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[10] == 1" label="平行应力/MPa" width="140px"
            prop="parallelStress" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[11] == 1" label="消除应力退火" width="140px"
            prop="stressReliefAnnealing" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[12] == 1" align="center" label="测量标准"
            width="120px" prop="standard" show-overflow-tooltip>
            <template slot-scope="scope">
              <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{
                scope.row.standard }}</el-button>
            </template>
          </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[13] == 1" align="center" label="测试员"
            width="100px" prop="testControler" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[14] == 1" align="center" label="测量日期"
            width="120px" prop="testDate" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[15] == 1" align="center" label="备注"
            width="100px" prop="remarks" show-overflow-tooltip></u-table-column>
          <u-table-column v-show="conditionList.visableList[16] == 1" align="center" label="文件名" width="100px"
            prop="fileName" show-overflow-tooltip></u-table-column>
          <u-table-column align="center" fixed="right" label="操作" width="200px">
            <template slot-scope="scope">
              <el-button @click="collect(scope.row)" size="mini" type="primary" plain>收藏</el-button>
              <el-divider direction="vertical"></el-divider>
              <el-button @click="echartsdownload(scope.row)" size="mini" type="primary" plain>下载测试报告</el-button>
            </template>
          </u-table-column>
        </u-table>

        <!-- 动态磁滞回线 -->
        <u-table use-virtual :row-height="rowHeight" ref="measureTable6" v-show="tableVisiable[6]"
          :data="measuConditionsData" @sort-change="getSortChange" :default-sort="sortRule" border height="500px"
          style="margin-top: 10px" @selection-change="getEchartsLegend">
          <u-table-column type="selection" width="55"> </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[0] == 1" label="裁剪角度/Deg." width="140px"
            prop="cuttingAngle" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[1] == 1" label="频率/Hz" width="100px"
            align="center" prop="frequency" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[2] == 1" label="温度/Cel.Deg" width="140px"
            prop="temperature" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[3] == 1" label="直流磁密/T" width="120px"
            prop="dcMagneticDensity" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[4] == 1" label="交流磁密/T" width="120px"
            prop="acMagneticDensity" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[5] == 1" label="直流磁场/(A/m)" width="160px"
            prop="dcMagneticField" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[6] == 1" label="交流磁场/(A/m)" width="160px"
            prop="acMagneticField" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[7] == 1" label="最大磁密/T" width="120px"
            prop="maximumFluxDensity" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[8] == 1" label="最大磁场/(A/m)" width="160px"
            prop="maximumMagneticField" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[9] == 1" label="最小磁密/T" width="120px"
            prop="minimumFluxDensity" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[10] == 1" label="最小磁场/(A/m)" width="160px"
            prop="minimumMagneticField" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[11] == 1" label="有无护套" width="120px"
            prop="sheath" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[12] == 1" label="叠压方向应力/MPa" width="180px"
            prop="overlyingStress" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[13] == 1" label="平行应力/MPa" width="140px"
            prop="parallelStress" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[14] == 1" label="消除应力退火" width="140px"
            align="center" prop="stressReliefAnnealing" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[15] == 1" label="损耗/(W/kg)" width="140px"
            align="center" prop="wastage" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[16] == 1" label="视在功率(VA/kg)" width="160px"
            prop="apparentPower" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[17] == 1" label="电势波形因子" width="140px"
            align="center" prop="potentialFactor" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[18] == 1" align="center" label="测量标准"
            width="120px" prop="standard" show-overflow-tooltip>
            <template slot-scope="scope">
              <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{
                scope.row.standard }}</el-button>
            </template>
          </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[19] == 1" align="center" label="测试员"
            width="100px" prop="testControler" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[20] == 1" align="center" label="测量日期"
            width="120px" prop="testDate" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[21] == 1" align="center" label="备注"
            width="100px" prop="remarks" show-overflow-tooltip></u-table-column>
          <u-table-column v-show="conditionList.visableList[22] == 1" align="center" label="文件名" width="100px"
            prop="fileName" show-overflow-tooltip></u-table-column>
          <u-table-column align="center" fixed="right" label="操作" width="200px">
            <template slot-scope="scope">
              <el-button @click="collect(scope.row)" size="mini" type="primary" plain>收藏</el-button>
              <el-divider direction="vertical"></el-divider>
              <el-button @click="echartsdownload(scope.row)" size="mini" type="primary" plain>下载测试报告</el-button>
            </template>
          </u-table-column>
        </u-table>

        <!-- 动态铁损曲线 -->
        <u-table use-virtual :row-height="rowHeight" ref="measureTable7" v-show="tableVisiable[7]"
          :data="measuConditionsData" @sort-change="getSortChange" :default-sort="sortRule" border height="500px"
          style="margin-top: 10px" @selection-change="getEchartsLegend">
          <u-table-column type="selection" width="55"> </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[0] == 1" label="裁剪角度/Deg." width="140px"
            prop="cuttingAngle" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[1] == 1" align="center" label="频率/Hz"
            width="100px" prop="frequency" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[2] == 1" label="温度/Cel.Deg" width="140px"
            prop="temperature" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[3] == 1" label="直流磁密/T" width="120px"
            prop="dcMagneticDensity" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[4] == 1" label="最大铁损/(W/kg)" width="160px"
            prop="maximumIronLoss" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[5] == 1" label="最大磁密/T" width="120px"
            prop="maximumFluxDensity" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[6] == 1" label="最小铁损/(W/kg)" width="160px"
            prop="minimumIronLoss" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[7] == 1" label="最小磁密/T" width="120px"
            prop="minimumFluxDensity" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[8] == 1" label="有无护套" width="120px"
            prop="sheath" align="center" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[9] == 1" label="叠压方向应力/MPa" width="180px"
            prop="overlyingStress" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[10] == 1" label="平行应力/MPa" width="140px"
            prop="parallelStress" show-overflow-tooltip align="center"></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[11] == 1" label="消除应力退火" width="140px"
            align="center" prop="stressReliefAnnealing" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[12] == 1" align="center" label="测量标准"
            width="120px" prop="standard" show-overflow-tooltip>
            <template slot-scope="scope">
              <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{
                scope.row.standard }}</el-button>
            </template>
          </u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[13] == 1" align="center" label="测试员"
            width="100px" prop="testControler" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[14] == 1" align="center" label="测量日期"
            width="120px" prop="testDate" show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" v-show="conditionList.visableList[15] == 1" align="center" label="备注"
            width="100px" prop="remarks" show-overflow-tooltip></u-table-column>
          <u-table-column v-show="conditionList.visableList[16] == 1" align="center" label="文件名" width="100px"
            prop="fileName" show-overflow-tooltip></u-table-column>
          <u-table-column align="center" fixed="right" label="操作" width="300px">
            <template slot-scope="scope">
              <el-button @click="collect(scope.row)" size="mini" type="primary" plain>收藏</el-button>
              <el-divider direction="vertical"></el-divider>
              <el-button @click="echartsdownload(scope.row)" size="mini" type="primary" plain>下载测试报告</el-button>
              <el-divider direction="vertical"></el-divider>
              <el-button @click="curveFitting(scope.row)" size="mini" type="primary" plain>曲线拟合</el-button>
            </template>
          </u-table-column>
        </u-table>
        <!-- <el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1" :current-page="pageVo.pagenum" :page-sizes="[10, 20]" :page-size="pageVo.pagesize" layout="total, sizes, prev, pager, next, jumper" :total="total1"> </el-pagination> -->
      </el-card>
    </el-card>
    <!-- 永磁 -->
    <el-card class="box-card" style="margin-top: 10px" v-if="importDataType == '永磁性能'">
      <div slot="header">
        <span style="color:#4e9efd;font-size:17px;">测量条件</span>
      </div>
      <el-card class="box-card">
        <div slot="header">
          <span>数据类型</span>
        </div>
        <a-row :gutter="24" style="margin-bottom: 5px">
          <a-col :sm="24" :md="12" :xl="8">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="0" border
              @change="judge('原始波形', '静态', 0)">静态原始波形 : {{ conditionNum.静态原始波形 }}</el-radio>
          </a-col>
          <a-col :sm="24" :md="12" :xl="8">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="1" border
              @change="judge('磁滞回线', '静态', 1)">静态磁滞回线 : {{ conditionNum.静态磁滞回线 }}</el-radio>
          </a-col>
          <a-col :sm="24" :md="12" :xl="8">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="2" border
              @change="judge('退磁曲线', '静态', 2)">静态退磁曲线 : {{ conditionNum.静态退磁曲线 }}</el-radio>
          </a-col>
        </a-row>
      </el-card>
      <el-card class="box-card" style="margin-top: 3px">
        <el-row :gutter="20">
          <el-col :span="2"><el-button type="primary" size="mini" style="width:100px"
              @click="hideSelect">隐藏选中数据</el-button> </el-col>
          <el-col :span="2"><el-button type="primary" size="mini" style="width:100px" @click="showAll">全部显示</el-button>
          </el-col>
          <!-- <el-col :span="2"><el-button type="primary" size="mini" style="width:100px" :disabled="exportMeaCondFlag" @click="exportMeaCond">导出测量条件</el-button> </el-col> -->
        </el-row>
        <u-table use-virtual :row-height="rowHeight" ref="measureTableYC" :data="measuConditionsData"
          @sort-change="getSortChange" :default-sort="sortRule" border height="500px" style="margin-top: 10px"
          @selection-change="getEchartsLegend">
          <u-table-column type="selection" width="55"> </u-table-column>
          <u-table-column sortable="custom" align="center" label="温度/Cel.Deg" prop="temperature" width="140px"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="Br/T" width="80px" prop="brT"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="Hcb/(kA/m)" width="140px" prop="hcb"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="Hcj/(kA/m)" width="140px" prop="hcj"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="BHm/(kJ/m^3)" width="160px" prop="bhm"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="Hmax/(kA/m)" width="140px" prop="hmax"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="测量标准" width="120px" prop="standard"
            show-overflow-tooltip>
            <template slot-scope="scope">
              <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{
                scope.row.standard }}</el-button>
            </template>
          </u-table-column>
          <u-table-column sortable="custom" align="center" label="测试员" width="100px" prop="testControler"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="测量日期" width="120px" prop="testDate"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="备注" prop="remarks"
            show-overflow-tooltip></u-table-column>
          <u-table-column align="center" label="文件名" width="100px" prop="fileName" show-overflow-tooltip></u-table-column>
          <u-table-column align="center" fixed="right" label="操作" width="200px">
            <template slot-scope="scope">
              <el-button @click="collect(scope.row)" size="mini" type="primary" plain>收藏</el-button>
              <el-divider direction="vertical"></el-divider>
              <el-button @click="echartsdownload(scope.row)" size="mini" type="primary" plain>下载测试报告</el-button>
            </template>
          </u-table-column>
        </u-table>
        <!-- <el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1" :current-page="pageVo.pagenum" :page-sizes="[10, 20]" :page-size="pageVo.pagesize" layout="total, sizes, prev, pager, next, jumper" :total="total1"> </el-pagination> -->
      </el-card>
    </el-card>
    <!-- 导电 -->
    <el-card class="box-card" style="margin-top: 10px" v-if="importDataType == '导电性能'">
      <div slot="header">
        <span style="color:#4e9efd;font-size:17px;">测量条件</span>
      </div>
      <el-card class="box-card">
        <div slot="header">
          <span>数据类型</span>
        </div>
        <a-row :gutter="24" style="margin-bottom: 5px">
          <a-col :sm="24" :md="12" :xl="6">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="0" border
              @change="judge('伏安曲线', '静态', 0)">静态伏安曲线 : {{ conditionNum.静态伏安曲线 }}</el-radio>
          </a-col>
          <a-col :sm="24" :md="12" :xl="6">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="1" border
              @change="judge('电阻曲线', '静态', 1)">静态电阻曲线 : {{ conditionNum.静态电阻曲线 }}</el-radio>
          </a-col>
          <a-col :sm="24" :md="12" :xl="6">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="2" border
              @change="judge('电阻率曲线', '静态', 2)">静态电阻率曲线 : {{ conditionNum.静态电阻率曲线 }}</el-radio>
          </a-col>
          <a-col :sm="24" :md="12" :xl="6">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="3" border
              @change="judge('电导率曲线', '静态', 3)">静态电导率曲线 : {{ conditionNum.静态电导率曲线 }}</el-radio>
          </a-col>
        </a-row>
      </el-card>
      <el-card class="box-card" style="margin-top: 3px">
        <el-row :gutter="20">
          <el-col :span="2"><el-button type="primary" size="mini" style="width:100px"
              @click="hideSelect">隐藏选中数据</el-button> </el-col>
          <el-col :span="2"><el-button type="primary" size="mini" style="width:100px" @click="showAll">全部显示</el-button>
          </el-col>
          <!-- <el-col :span="2"><el-button type="primary" size="mini" style="width:100px" :disabled="exportMeaCondFlag" @click="exportMeaCond">导出测量条件</el-button> </el-col> -->
        </el-row>
        <u-table use-virtual :row-height="rowHeight" ref="measureTableDD" :data="measuConditionsData"
          @sort-change="getSortChange" :default-sort="sortRule" border height="500px" style="margin-top: 10px"
          @selection-change="getEchartsLegend">
          <u-table-column type="selection" width="55"> </u-table-column>
          <u-table-column sortable="custom" align="center" label="裁剪角度/Deg." width="140px" prop="cuttingAngle"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="测量间距/m" width="130px" prop="measuringDistance"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="频率/Hz" width="100px" prop="frequency"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="温度/Cel.Deg" width="140px" prop="temperature"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="消除应力退火" width="140px" prop="stressReliefAnnealing"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="测量标准" width="130px" prop="standard"
            show-overflow-tooltip>
            <template slot-scope="scope">
              <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{
                scope.row.standard }}</el-button>
            </template>
          </u-table-column>
          <u-table-column sortable="custom" align="center" label="测试员" width="100px" prop="testControler"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="备注" prop="remarks"
            show-overflow-tooltip></u-table-column>
          <u-table-column align="center" label="文件名" width="100px" prop="fileName" show-overflow-tooltip></u-table-column>
          <!-- <u-table-column  align="center" fixed="right" label="操作"  :width="curveType == 3 ? '300px' : '200px'"> -->
          <u-table-column align="center" fixed="right" label="操作" width="200px">
            <template slot-scope="scope">
              <el-button @click="collect(scope.row)" size="mini" type="primary" plain>收藏</el-button>
              <el-divider direction="vertical"></el-divider>
              <el-button @click="echartsdownload(scope.row)" size="mini" type="primary" plain>下载测试报告</el-button>
              <!-- <el-divider direction="vertical" v-if="curveType == 3"></el-divider>
              <el-button @click="curveFitting(scope.row)" size="mini" type="primary" plain v-if="curveType == 3">曲线拟合</el-button> -->
            </template>
          </u-table-column>
        </u-table>
        <!-- <el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1" :current-page="pageVo.pageNum" :page-sizes="[10, 20]" :page-size="pageVo.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total1"> </el-pagination> -->
      </el-card>
    </el-card>
    <!-- 传热 -->
    <el-card class="box-card" style="margin-top: 10px" v-if="importDataType == '传热性能'">
      <div slot="header">
        <span style="color:#4e9efd;font-size:17px;">测量条件</span>
      </div>
      <el-card class="box-card">
        <div slot="header">
          <span>数据类型</span>
        </div>
        <a-row :gutter="24" style="margin-bottom: 5px">
          <a-col :sm="24" :md="12" :xl="6">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="0" border
              @change="judge('导热曲线', '传热性能', 0)">导热曲线 : {{ conditionNum.导热系数 }}</el-radio>
          </a-col>
          <a-col :sm="24" :md="12" :xl="6">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="1" border
              @change="judge('热扩散曲线', '传热性能', 1)">热扩散曲线 : {{ conditionNum.热扩散系数 }}</el-radio>
          </a-col>
          <a-col :sm="24" :md="12" :xl="6">
            <el-radio style="width:180px;" v-model="curveDisplayRadio" label="2" border
              @change="judge('比热曲线', '传热性能', 2)">比热曲线 : {{ conditionNum.比热系数 }}</el-radio>
          </a-col>
        </a-row>
      </el-card>
      <el-card class="box-card" style="margin-top: 3px">
        <el-row :gutter="20">
          <el-col :span="2"><el-button type="primary" size="mini" style="width:100px"
              @click="hideSelect">隐藏选中数据</el-button> </el-col>
          <el-col :span="2"><el-button type="primary" size="mini" style="width:100px" @click="showAll">全部显示</el-button>
          </el-col>
        </el-row>
        <u-table use-virtual :row-height="rowHeight" ref="measureTableDR" :data="measuConditionsData"
          @sort-change="getSortChange" :default-sort="sortRule" border height="500px" style="margin-top: 10px"
          @selection-change="getEchartsLegend">
          <u-table-column type="selection" width="55"> </u-table-column>
          <u-table-column sortable="custom" align="center" label="热流方向" width="140px" prop="heatFlowDirection"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="是否各向异性" width="130px" prop="isAnisotropy"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="涂层厚度/um" width="130px" prop="coatingThickness"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="最低温度/℃" width="140px" prop="minTemperature"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="最高温度/℃" width="140px" prop="maxTemperature"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="最小导热系数/(W/m·K)" width="210px"
            prop="minThermalConductivity" show-overflow-tooltip v-if="curveType == 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="最大导热系数/(W/m·K)" width="210px"
            prop="maxThermalConductivity" show-overflow-tooltip v-if="curveType == 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="最小热扩散系数/(W/m·K)" width="210px"
            prop="minDiffusionConductivity" show-overflow-tooltip v-if="curveType != 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="最大热扩散系数/(W/m·K)" width="210px"
            prop="maxDiffusionConductivity" show-overflow-tooltip v-if="curveType != 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="压力/MPa" width="120px" prop="stress"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="测量标准" width="130px" prop="standard"
            show-overflow-tooltip>
            <template slot-scope="scope">
              <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{
                scope.row.standard }}</el-button>
            </template>
          </u-table-column>
          <u-table-column sortable="custom" align="center" label="测试员" width="100px" prop="testController"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="测量日期" width="130px" prop="testDate"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="备注" prop="remarks"
            show-overflow-tooltip></u-table-column>
          <u-table-column align="center" label="文件名" width="100px" prop="fileName" show-overflow-tooltip></u-table-column>
          <u-table-column align="center" fixed="right" label="操作" width="100px">
            <template slot-scope="scope">
              <el-button @click="collect(scope.row)" size="mini" type="primary" plain>收藏</el-button>
              <!-- <el-divider direction="vertical"></el-divider>
              <el-button @click="echartsdownload(scope.row)" size="mini" type="primary" plain>下载测试报告</el-button> -->
            </template>
          </u-table-column>
        </u-table>
      </el-card>
    </el-card>
    <!-- 机械 -->
    <el-card class="box-card" style="margin-top: 10px" v-if="importDataType == '机械性能'">
      <div slot="header">
        <span style="color:#4e9efd;font-size:17px;">测量条件</span>
      </div>
      <el-card class="box-card">
        <div slot="header">
          <span>数据类型</span>
        </div>
        <a-row :gutter="24" style="margin-bottom: 5px;display: flex;justify-content: space-between;">
          <el-radio style="width:180px;" v-model="curveDisplayRadio" label="0" border
            @change="judge('拉伸曲线', '机械性能', 0)">拉伸曲线 : {{ conditionNum.拉伸曲线 }}</el-radio>
          <el-radio style="width:180px;" v-model="curveDisplayRadio" label="1" border
            @change="judge('压缩曲线', '机械性能', 1)">压缩曲线 : {{ conditionNum.压缩曲线 }}</el-radio>
          <el-radio style="width:180px;" v-model="curveDisplayRadio" label="2" border
            @change="judge('剪切曲线', '机械性能', 2)">剪切曲线 : {{ conditionNum.剪切曲线 }}</el-radio>
          <el-radio style="width:180px;" v-model="curveDisplayRadio" label="3" border
            @change="judge('弯曲曲线', '机械性能', 3)">弯曲曲线 : {{ conditionNum.弯曲曲线 }}</el-radio>
          <el-radio style="width:180px;" v-model="curveDisplayRadio" label="4" border
            @change="judge('冲击曲线', '机械性能', 4)">冲击曲线 : {{ conditionNum.冲击曲线 }}</el-radio>
        </a-row>
      </el-card>
      <el-card class="box-card" style="margin-top: 3px">
        <el-row :gutter="20">
          <el-col :span="2"><el-button type="primary" size="mini" style="width:100px"
              @click="hideSelect">隐藏选中数据</el-button> </el-col>
          <el-col :span="2"><el-button type="primary" size="mini" style="width:100px" @click="showAll">全部显示</el-button>
          </el-col>
        </el-row>
        <u-table use-virtual :row-height="rowHeight" ref="measureTableDR" :data="measuConditionsData"
          @sort-change="getSortChange" :default-sort="sortRule" border height="500px" style="margin-top: 10px"
          @selection-change="getEchartsLegend">
          <!-- 拉伸曲线表头 -->
          <u-table-column type="selection" width="55"> </u-table-column>
          <u-table-column sortable="custom" align="center" label="温度/℃" width="100px" prop="temperature"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="消除应力退火" width="150px" prop="stressReliefAnnealing"
            show-overflow-tooltip v-if="curveType == 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="剪切方向/°" width="150px" prop="clippingDirection"
            show-overflow-tooltip v-if="curveType == 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="原始横截面积/mm^2" width="200px" prop="crossSectionalArea"
            show-overflow-tooltip v-if="curveType == 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="最大力/N" width="120px" prop="maximumForce"
            show-overflow-tooltip v-if="curveType != 4"></u-table-column>
          <u-table-column sortable="custom" align="center" label="上屈服力/N" width="120px" prop="upperYieldingForce"
            show-overflow-tooltip v-if="curveType == 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="下屈服力/N" width="120px" prop="lowerYieldingForce"
            show-overflow-tooltip v-if="curveType == 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="上屈服强度/MPa" width="180px" prop="onYieldStrength"
            show-overflow-tooltip v-if="curveType == 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="下屈服强度/MPa" width="180px" prop="lowerYieldStrength"
            show-overflow-tooltip v-if="curveType == 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="规定塑性延伸强度/MPa" width="200px"
            prop="specifiesThePlasticElongationStrength" show-overflow-tooltip v-if="curveType == 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="抗拉强度/MPa" width="160px" prop="tensileStrength"
            show-overflow-tooltip v-if="curveType == 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="弹性模量/GPa" width="160px" prop="elasticModulus"
            show-overflow-tooltip v-if="curveType == 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="断后伸长率/%" width="160px" prop="elongationBreak"
            show-overflow-tooltip v-if="curveType == 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="断裂总伸长率/%" width="160px" prop="totalElongationBreak"
            show-overflow-tooltip v-if="curveType == 0"></u-table-column>
          <u-table-column sortable="custom" align="center" label="测量标准" width="130px" prop="standard"
            show-overflow-tooltip>
            <template slot-scope="scope">
              <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{
                scope.row.standard }}</el-button>
            </template>
          </u-table-column>
          <u-table-column sortable="custom" align="center" label="测试员" width="100px" prop="testController"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="测量日期" width="130px" prop="testDate"
            show-overflow-tooltip></u-table-column>
          <u-table-column sortable="custom" align="center" label="备注" prop="remarks"
            show-overflow-tooltip></u-table-column>
          <u-table-column align="center" label="文件名" width="100px" prop="fileName" show-overflow-tooltip></u-table-column>
          <u-table-column align="center" fixed="right" label="操作" width="100px">
            <template slot-scope="scope">
              <el-button @click="collect(scope.row)" size="mini" type="primary" plain>收藏</el-button>
              <!-- <el-divider direction="vertical"></el-divider>
              <el-button @click="echartsdownload(scope.row)" size="mini" type="primary" plain>下载测试报告</el-button> -->
            </template>
          </u-table-column>
        </u-table>
      </el-card>
    </el-card>
    <!--磁致伸缩性能-->
    <el-card class="box-card" style="margin-top: 10px" v-if="importDataType == '磁致伸缩性能'">
      <div slot="header">
        <span style="color:#4e9efd;font-size:17px;">测量条件</span>
      </div>
      <el-card class="box-card">
        <div slot="header">
          <span>数据类型</span>
        </div>
        <a-row :gutter="24" style="margin-bottom: 5px;display: flex;justify-content: space-between;">
          <el-radio style="width:180px;" v-model="curveDisplayRadio" label="0" border
            @change="judge('原始波形', '磁致伸缩性能', 0)">原始波形 : {{ conditionNum.原始波形 }}</el-radio>
          <el-radio style="width:180px;" v-model="curveDisplayRadio" label="1" border
            @change="judge('蝴蝶曲线', '磁致伸缩性能', 1)">蝴蝶曲线 : {{ conditionNum.蝴蝶曲线 }}</el-radio>
          <el-radio style="width:180px;" v-model="curveDisplayRadio" label="2" border
            @change="judge('磁滞回线', '磁致伸缩性能', 2)">磁滞回线 : {{ conditionNum.磁滞回线 }}</el-radio>
        </a-row>
        <el-card class="box-card" style="margin-top: 3px">
          <el-row :gutter="20">
            <el-col :span="2"><el-button type="primary" size="mini" style="width:100px"
                @click="hideSelect">隐藏选中数据</el-button> </el-col>
            <el-col :span="2"><el-button type="primary" size="mini" style="width:100px" @click="showAll">全部显示</el-button>
            </el-col>
          </el-row>
          <u-table use-virtual :row-height="rowHeight" ref="measureTable" :data="measuConditionsData"
            @sort-change="getSortChange" :default-sort="sortRule" border height="500px" style="margin-top: 10px"
            @selection-change="getEchartsLegend">
            <u-table-column type="selection" width="55"> </u-table-column>
            <u-table-column sortable="custom" align="center" label="裁剪角度/Deg.'" width="160px" prop="cuttingAngle"
              show-overflow-tooltip></u-table-column>
            <u-table-column sortable="custom" align="center" label="频率/Hz" width="120px" prop="frequency"
              show-overflow-tooltip></u-table-column>
            <u-table-column sortable="custom" align="center" label="温度/Cel.Deg." width="150px" prop="temperature"
              show-overflow-tooltip></u-table-column>
            <u-table-column sortable="custom" align="center" label="磁致伸缩系数λpp/ppm" width="200px" prop="mpCoefficient"
              show-overflow-tooltip></u-table-column>
            <u-table-column sortable="custom" align="center" label="磁致伸缩系数λo-p/ppm" width="200px" prop="moCoefficient"
              show-overflow-tooltip></u-table-column>
            <u-table-column sortable="custom" align="center" label="直流磁密/T" width="140px" prop="dcMagneticDensity"
              show-overflow-tooltip></u-table-column>
            <u-table-column sortable="custom" align="center" label="交流磁密/T'" width="140px" prop="acMagneticDensity"
              show-overflow-tooltip></u-table-column>
            <u-table-column sortable="custom" align="center" label="直流磁场/(A/m)" width="150px" prop="dcMagneticField"
              show-overflow-tooltip></u-table-column>
            <u-table-column sortable="custom" align="center" label="交流磁场/(A/m)" width="150px" prop="acMagneticField"
              show-overflow-tooltip></u-table-column>
            <u-table-column sortable="custom" align="center" label="消除应力退火" width="180px" prop="stressReliefAnnealing"
              show-overflow-tooltip></u-table-column>
            <u-table-column sortable="custom" align="center" label="损耗/(J/kg)" width="120px" prop="loss"
              show-overflow-tooltip></u-table-column>
            <u-table-column sortable="custom" align="center" label="应力/MPa" width="150px" prop="stress"
              show-overflow-tooltip></u-table-column>
            <u-table-column sortable="custom" align="center" label="测量标准" width="130px" prop="standard"
              show-overflow-tooltip>
              <template slot-scope="scope">
                <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{
                  scope.row.standard }}</el-button>
              </template>
            </u-table-column>
            <u-table-column sortable="custom" align="center" label="测试员" width="100px" prop="testController"
              show-overflow-tooltip></u-table-column>
            <u-table-column sortable="custom" align="center" label="测量日期" width="130px" prop="testDate"
              show-overflow-tooltip></u-table-column>
            <u-table-column sortable="custom" align="center" label="备注" prop="remarks"
              show-overflow-tooltip></u-table-column>
            <u-table-column align="center" label="文件名" width="100px" prop="fileName"
              show-overflow-tooltip></u-table-column>
            <u-table-column align="center" fixed="right" label="操作" width="100px">
              <template slot-scope="scope">
                <el-button @click="collect(scope.row)" size="mini" type="primary" plain>收藏</el-button>
                <!-- <el-divider direction="vertical"></el-divider>
                <el-button @click="echartsdownload(scope.row)" size="mini" type="primary" plain>下载测试报告</el-button> -->
              </template>
            </u-table-column>
          </u-table>
          <!-- <el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1" :current-page="pageVo.pageNum" :page-sizes="[10, 20]" :page-size="pageVo.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total1"> </el-pagination> -->
        </el-card>
      </el-card>

    </el-card>



    <!-- 收藏弹窗 -->
    <el-dialog title="收藏" :visible.sync="collectVisible" width="40%" :show-close="false" :close-on-click-modal="false">
      <el-row :gutter="20">
        <el-col> 补充信息： <el-input type="textarea" autosize placeholder="请输入补充信息" style="width: 80%"
            v-model="collectinSupplement"> </el-input> </el-col>
      </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" size="small" style="margin-right: 20px" @click="confirmCollect()">确认收藏</el-button>
        <el-button type="danger" size="small" style="margin-right: 20px" @click="closeCollect()">关闭</el-button>
      </span>
    </el-dialog>
    <!-- 拟合弹窗 -->
    <el-dialog title="曲线拟合" :visible.sync="curveFittingVisible" width="90%" :show-close="false"
      :close-on-click-modal="false">
      <div style="display: flex" v-loading="fittingLoading" element-loading-text="正在加载中"
        element-loading-spinner="el-icon-loading">
        <el-card :style="`width: ${fittingStyle.width1}%; margin: 0 5px 0 0;height:750px;`" shadow="hover">
          <div style="width: 30%; margin: 0 5px 0 0; height: 750px; float: left" :hidden="fittingStyle.hidden">
            <el-card style="margin-bottom: 7px">
              <div slot="header">
                <span style="font-size: 16px">模型名称</span>
              </div>
              <el-select v-model="curveFittingParams.modelName" placeholder="请选择模型名称">
                <el-option v-for="item in modelNameOptions" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </el-card>
            <el-card style="margin-bottom: 7px">
              <div slot="header">
                <span style="font-size: 16px; margin-right: 10px">拟合方法</span>
                <el-tooltip placement="right" content="由于遗传算法计算时间很长，故不提供计算遗传算法功能！">
                  <el-button type="text" size="medium" style="padding-top: 5px"><i
                      class="el-icon-warning-outline"></i></el-button>
                </el-tooltip>
              </div>
              <el-radio v-model="curveFittingParams.fittingMethod" label="模式搜索法"
                style="margin-bottom: 18px">模式搜索法</el-radio><br />
              <el-radio v-model="curveFittingParams.fittingMethod" disabled label="遗传算法"
                style="margin-bottom: 18px">遗传算法</el-radio><br />
              <el-radio v-model="curveFittingParams.fittingMethod" label="模拟退火法">模拟退火法</el-radio>
            </el-card>
            <el-card style="margin-bottom: 7px">
              <div slot="header">
                <span style="font-size: 16px">目标函数</span>
              </div>
              <el-radio v-model="curveFittingParams.objectiveFunction" label="绝对误差"
                style="margin-bottom: 18px">绝对误差</el-radio><br />
              <el-radio v-model="curveFittingParams.objectiveFunction" label="相对误差">相对误差</el-radio>
            </el-card>
            <el-card>
              <div slot="header">
                <span style="font-size: 16px">模型误差</span>
              </div>
              <el-table :data="modelErrorData" style="width: 100%" border stripe header-align="center"
                :show-header="false">
                <el-table-column prop="date" show-overflow-tooltip> </el-table-column>
              </el-table>
            </el-card>
          </div>
          <div :style="`width:${fittingStyle.width2}%;float:left;`">
            <el-card style="margin-bottom: 20px">
              <div slot="header">
                <span style="font-size: 16px">模型参数</span>
              </div>
              <el-table :data="modelParametersData" style="width: 100%" height="550px" border stripe header-align="center"
                <el-table-column type="index" width="50"> </el-table-column>
                <el-table-column prop="name" label="变量名" align="center" width="70" show-overflow-tooltip>
                </el-table-column>
                <el-table-column prop="unit" label="单位" align="center" width="70" show-overflow-tooltip>
                </el-table-column>
                <el-table-column prop="chineseNotes" label="中文注释" align="center" show-overflow-tooltip> </el-table-column>
                <el-table-column prop="value" label="值" align="center" show-overflow-tooltip> </el-table-column>
              </el-table>
            </el-card>
          </div>
          <div :style="`width:${fittingStyle.width3}%;float:left;`">
            <el-row :gutter="20">
              <el-col :span="6"><el-button @click="startFitting()">开始拟合</el-button></el-col>
              <el-col :span="6"><el-button @click="saveParameters()">数据导出</el-button></el-col>
              <el-col :span="6"><el-button @click="modelDescription()">模型说明</el-button></el-col>
            </el-row>
          </div>
        </el-card>
        <el-card :style="`width: ${fittingStyle.width4}%; margin: 0 5px 0 5px;height:750px;`" shadow="hover">
          <div id="fittingMain" style="height: 550px; width: 100%"></div>
        </el-card>
      </div>
      <span slot="footer" class="dialog-footer">
        <!-- <el-button type="primary" size="small" style="margin-right: 20px" @click="confirmCurveFitting()">确认</el-button> -->
        <el-button type="danger" size="small" style="margin-right: 20px" @click="closeCurveFitting()">关闭</el-button>
      </span>
    </el-dialog>
    <!-- 拟合弹窗 -->
  </div>
</template>

<script>
import * as echarts from 'echarts'
import { Message } from 'element-ui'
export default {
  props: {
    conditionNum: {},
    importDataType: '',
    tableRow: {}
    //不同的地方用到该组件，用于控制按钮的显隐
  },
  data() {
    return {
      rowHeight: 55,
      measuConditionsData: [],
      currentCheckedNum: '',
      isAdminRole: false,
      /*************** 测量条件排序 *********************/
      sortRule: { prop: null, order: null },
      sortType: null,
      sortProp: '',
      oldTableData: [],
      hideSelection: [],
      /*************** 测量条件排序 *********************/

      /*************** 曲线拟合 *********************/
      fittingStyle: {
        hidden: false,
        width1: 50,
        width2: 69,
        width3: 63,
        width4: 50
      },
      curveFittingVisible: false,
      currentFitting: [],
      fittingLoading: false,
      modelNameOptions: [
        {
          value: 'Bertotti',
          label: 'Bertotti'
        }
      ],
      curveFittingParams: {
        modelName: '',
        fittingMethod: '',
        objectiveFunction: ''
      },
      modelErrorData: [
        {
          date: '绝对误差'
        },
        {
          date: '相对误差'
        }
      ],
      modelParametersData: [],
      fittingOption: {
        toolbox: {
          show: true,
          feature: {
            saveAsImage: {}
          }
        },
        legend: {
          icon: 'none',
          textStyle: {
            color: 'inherit'
          },
          data: []
        },
        tooltip: {
          confine: true,
          formatter: (params, ticket, callback) => {
            if (params.componentIndex % 2 == 0) {
              //偶数-■-
              return '内禀磁密测量值/T:' + params.data[0] + `<br />` + '铁损耗测量值/W/kg:' + params.data[1]
            } else {
              //奇数-○-
              return '内禀磁密测量值/T:' + params.data[0] + `<br />` + '铁损耗拟合值/W/kg:' + params.data[1]
            }
          }
        },
        dataZoom: [
          {
            disabled: false,
            id: 'dataZoomX',
            type: 'inside',
            top: 'bottom',
            xAxisIndex: [0],
            filterMode: 'empty'
          },
          {
            disabled: false,
            id: 'dataZoomY',
            type: 'inside',
            yAxisIndex: [0],
            filterMode: 'empty'
          }
        ],
        xAxis: {
          type: 'value',
          name: '内禀磁密测量值/T',
          nameTextStyle: {
            fontsize: 100,
            fontWeight: 'bold',
            padding: [20, 0, 0, 0]
          },
          nameLocation: 'middle'
        },
        yAxis: [
          {
            type: 'log',
            logBase: 10,
            minorSplitLine: {
              show: true
            },
            name: '铁损耗测量值/W/kg  -○-',
            position: 'left',
            nameTextStyle: {
              fontsize: 100,
              fontWeight: 'bold',
              padding: [0, 0, 15, 0]
            },
            nameLocation: 'middle'
          },
          {
            type: 'log',
            logBase: 10,
            minorSplitLine: {
              show: true
            },
            name: '铁损耗拟合值/W/kg  -■-',
            position: 'right',
            axisLine: {
              show: true
            },
            nameTextStyle: {
              fontsize: 100,
              fontWeight: 'bold',
              padding: [0, 0, 15, 0]
            },
            nameLocation: 'middle'
          }
        ],
        series: []
      },
      /*************** 曲线拟合 *********************/

      /******************** 收藏 ************************/
      collectVisible: false,
      collectinformation: {},
      collectinSupplement: '',
      /******************** 收藏 ************************/
      externalDataSource: {}, //外部数据源
      exportMeaCondFlag: true,
      arr: [],
      curve: '',
      display: '',
      curveDisplayRadio: '',
      conditionInfo: {
        curveTypes: '',
        timeTypes: '',
        productId: ''
      },
      curveType: -1,
      total: 10,
      total1: 10,
      //测量条件分页
      pageVo: {
        //当前的页数
        pageNum: 1,
        //当前每页显示多少条数据
        pageSize: 10
      },
      tableVisiable: [0, 0, 0, 0, 0, 0, 0, 0],
      sampleSize: '',
      conditionList: {
        datalist: [],
        visableList: []
      },
      tempDatalist: [],
      dataHideNum: 0,
      //静态原始波形
      staticOriginalWave: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //未知
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      //静态磁化曲线
      staticMagnetizingCurve: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //未知
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      //静态磁滞回线
      staticHysteresisLoop: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //未知
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      //静态铁损曲线
      staticIronLossCurve: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //未知
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      //动态原始波形
      dynamicOriginalWave: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //未知
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      //动态磁化曲线
      dynamicMagnetizingCurve: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      //动态磁滞回线
      dynamicHysteresisLoop: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      //动态铁损曲线
      dynamicIronLossCurve: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //未知
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      // 软磁曲线类型
      ruanCiCurveOptions: [
        {
          label: '原始波形',
          value: '原始波形'
        },
        {
          label: '磁化曲线',
          value: '磁化曲线'
        },
        {
          label: '磁滞回线',
          value: '磁滞回线'
        },
        {
          label: '铁损曲线',
          value: '铁损曲线'
        }
      ],
      // 软磁时间形式
      ruanCiDisplayOptions: [
        {
          label: '动态',
          value: '动态'
        },
        {
          label: '静态',
          value: '静态'
        }
      ],
      // 永磁曲线类型
      yongCiCurveOptions: [
        {
          label: '原始波形',
          value: '原始波形'
        },
        {
          label: '磁滞回线',
          value: '磁滞回线'
        },
        {
          label: '退磁曲线',
          value: '退磁曲线'
        }
      ],
      // 永磁时间形式
      yongCiDisplayOptions: [
        {
          label: '静态',
          value: '静态'
        }
      ],
      // 导电曲线类型
      daoDianCurveOptions: [
        {
          label: '伏安曲线',
          value: '伏安曲线'
        },
        {
          label: '电阻曲线',
          value: '电阻曲线'
        },
        {
          label: '电阻率曲线',
          value: '电阻率曲线'
        },
        {
          label: '电导率曲线',
          value: '电导率曲线'
        }
      ],
      // 导电时间形式
      daoDianDisplayOptions: [
        {
          label: '静态',
          value: '静态'
        }
      ]
    }
  },
  created() {
    this.isAdminRoleConfirm()
  },
  methods: {
    /*************** 隐藏选中的测量数据 *********************/
    hideSelect() {
      if (this.hideSelection.length) {
        for (let i = 0; i < this.hideSelection.length; i++) {
          for (let j = 0; j < this.measuConditionsData.length; j++) {
            if (this.hideSelection[i].id == this.measuConditionsData[j].id) {
              this.measuConditionsData.splice(j, 1)
              break
            }
          }
        }
        for (let i = 0; i < this.hideSelection.length; i++) {
          for (let j = 0; j < this.oldTableData.length; j++) {
            if (this.hideSelection[i].id == this.oldTableData[j].id) {
              this.oldTableData.splice(j, 1)
              break
            }
          }
        }
        this.dataHideNum = 1
        Message({
          message: '隐藏成功！',
          type: 'success',
          center: true,
          customClass: 'mzindex'
        })
      } else {
        Message({
          message: '请先勾选测量条件数据！',
          type: 'warning',
          center: true,
          customClass: 'mzindex'
        })
      }
    },

    showAll() {
      if (this.dataHideNum == 0) {
        Message({
          message: '当前没有隐藏掉的数据！',
          type: 'warning',
          center: true,
          customClass: 'mzindex'
        })
      } else {
        this.measuConditionsData = JSON.parse(JSON.stringify(this.tempDatalist))
        this.oldTableData = JSON.parse(JSON.stringify(this.tempDatalist))
        this.dataHideNum = 0
        Message({
          message: '全部显示成功！',
          type: 'success',
          center: true,
          customClass: 'mzindex'
        })
      }
    },
    /*************** 隐藏选中的测量数据 *********************/

    /*************** 测量条件排序 *********************/
    getSortChange(column) {
      if (column.order !== null) {
        this.sortType = column.order
      } else if (this.sortType !== null && column.order === null) {
        this.sortType = null
      }
      this.sortProp = column.prop
      var prop = column.prop
      if (column.order !== null) {
        const data = []
        for (let i = 0; i < this.measuConditionsData.length; i++) {
          //判断如果是空的push在数字后面，有值的就放在前面，然后把排好的数组再赋值给表格data
          if (this.measuConditionsData[i][prop] === null || this.measuConditionsData[i][prop] === '' || this.measuConditionsData[i][prop] === undefined) {
            console.log('11111')
            data.push(this.measuConditionsData[i]) //往数组最后面添加
          } else {
            data.unshift(this.measuConditionsData[i]) //往数组最前面添加
          }
        }
        // 自定义排序方法  过滤掉 null undefined '' 等空值
        // 此排序有一个小问题，就是对于其中混入的例如“未知”等中文字，在降序的时候会被排在最上方
        data.sort((a, b) => {
          if (a[prop] === b[prop]) {
            return 0
          } else if (a[prop] === null || a[prop] === '' || a[prop] === undefined) {
            return 1
          } else if (b[prop] === null || b[prop] === '' || b[prop] === undefined) {
            return -1
          } else if (column.order === 'ascending') {
            // 升序
            return a[prop] - b[prop]
          } else {
            // 降序
            return b[prop] - a[prop]
          }
        })
        this.measuConditionsData = data
      } else {
        this.measuConditionsData = JSON.parse(JSON.stringify(this.oldTableData))
      }
    },
    /*************** 测量条件排序 *********************/

    /*************** 曲线拟合 *********************/
    curveFitting() {
      if (this.isAdminRole == false) {
        Message({
          message: '暂无权限，无法使用',
          type: 'warning',
          center: true,
          customClass: 'mzindex'
        })
        return
      }
      if (this.importDataType == '软磁性能') {
        if (this.hideSelection.length != 1) {
          Message({
            message: '请先勾选一条测量数据再进行曲线拟合！',
            type: 'warning',
            center: true,
            customClass: 'mzindex'
          })
        } else {
          this.fittingStyle = {
            hidden: false,
            width1: 50,
            width2: 69,
            width3: 63,
            width4: 50
          }
          this.currentFitting = []
          this.currentFitting = this.hideSelection
          this.curveFittingVisible = true
        }
      } else if (this.importDataType == '永磁性能' || this.importDataType == '传热性能') {
      } else if (this.importDataType == '导电性能') {
        if (this.hideSelection.length < 2) {
          Message({
            message: '请先勾选两个测量数据再进行曲线拟合！',
            type: 'warning',
            center: true,
            customClass: 'mzindex'
          })
        } else {
          this.fittingStyle = {
            hidden: true,
            width1: 35,
            width2: 100,
            width3: 100,
            width4: 65
          }
          this.currentFitting = []
          this.currentFitting = this.hideSelection
          this.curveFittingVisible = true
        }
      }
    },
    closeCurveFitting() {
      this.curveFittingVisible = false
      this.modelParametersData = []
      this.fittingChart.dispose()
    },
    startFitting() {
      if (this.importDataType == '软磁性能') {
        if (this.curveFittingParams.fittingMethod == '' && this.curveFittingParams.objectiveFunction == '') {
          Message({
            message: '请先选择拟合方法以及目标函数！',
            type: 'warning',
            center: true,
            customClass: 'mzindex'
          })
        } else {
          this.fittingLoading = true
          this.axios({
            baseURL: 'http://59.172.104.174:30669',
            url: '/bertotti',
            method: 'POST',
            data: {
              measurementId: this.currentFitting[0].id,
              frequency: this.currentFitting[0].frequency,
              temperature: this.currentFitting[0].temperature,
              fittingMethod: this.curveFittingParams.fittingMethod,
              objFuntion: this.curveFittingParams.objectiveFunction
            }
          }).then(res => {
            this.fittingLoading = false
            console.log('resres', res)
            // 参数模型表数据处理
            this.modelParametersData = []
            for (let i = 0; i < res.data.result.property.length; i++) {
              let obj = {
                name: res.data.result.property[i],
                unit: '',
                chineseNotes: '',
                value: res.data.result.content[i]
              }
              this.modelParametersData.push(obj)
            }
            // echarts图x,y轴名称处理
            this.fittingOption.xAxis.name = res.data.result.name[0]
            this.fittingOption.yAxis[0].name = res.data.result.name[1]
            this.fittingOption.yAxis[1].name = res.data.result.name[2]
            this.$set(this.fittingOption.xAxis, 'scale', false)
            this.$set(this.fittingOption.yAxis[0], 'scale', false)
            this.$set(this.fittingOption.yAxis[1], 'scale', false)
            // 拟合echarts图处理
            let nameTitle = '牌号:' + this.tableRow.grade + '; 频率/Hz:' + this.currentFitting[0].frequency + '; 温度/Cel.Deg:' + this.currentFitting[0].temperature
            this.fittingOption.legend.data = []
            this.fittingOption.legend.data.push(nameTitle)
            var arrayOne = []
            var arrayTwo = []
            for (let i = 0; i < res.data.result.result.length; i++) {
              var sonArrayOne = []
              var sonArrayTwo = []
              for (let j = 0; j < res.data.result.result[i].length; j++) {
                sonArrayOne[0] = res.data.result.result[i][0]
                sonArrayOne[1] = res.data.result.result[i][1]
                sonArrayTwo[0] = res.data.result.result[i][0]
                sonArrayTwo[1] = res.data.result.result[i][2]
              }
              arrayOne.push(sonArrayOne)
              arrayTwo.push(sonArrayTwo)
            }
            let inputParamsOne = {
              name: nameTitle,
              data: arrayOne,
              type: 'line',
              smooth: true
            }
            let inputParamsTwo = {
              name: nameTitle,
              data: arrayTwo,
              type: 'line',
              smooth: true,
              symbol: 'rect'
            }
            this.fittingOption.series = []
            this.fittingOption.series.push(inputParamsOne)
            this.fittingOption.series.push(inputParamsTwo)
            this.fittingChart = echarts.init(document.getElementById('fittingMain'))
            this.fittingChart.setOption(this.fittingOption)
          })
        }
      } else if (this.importDataType == '永磁性能' || this.importDataType == '传热性能') {
      } else if (this.importDataType == '导电性能') {
        let linearDataList = []
        this.currentFitting.forEach(item => {
          let obj = {
            measurementId: item.id,
            temperature: item.temperature
          }
          linearDataList.push(obj)
        })
        this.axios({
          baseURL: 'http://59.172.104.174:30669',
          url: '/Linear',
          method: 'POST',
          data: { linearDataList }
        }).then(res => {
          console.log('resres', res)
          this.fittingOption.series = []
          this.fittingOption.legend.data = []
          // 参数模型表数据处理
          this.modelParametersData = []
          for (let i = 0; i < res.data.result.property.length; i++) {
            let obj = {
              name: res.data.result.property[i],
              unit: '',
              chineseNotes: '',
              value: res.data.result.content[i]
            }
            this.modelParametersData.push(obj)
          }
          // echarts图x,y轴名称处理
          this.fittingOption.xAxis.name = res.data.result.name[1]
          this.fittingOption.yAxis[0].name = res.data.result.name[2]
          this.fittingOption.yAxis[1].name = res.data.result.name[3]
          this.$set(this.fittingOption.xAxis, 'scale', true)
          this.$set(this.fittingOption.yAxis[0], 'scale', true)
          this.$set(this.fittingOption.yAxis[1], 'scale', true)
          // echarts图数据处理
          var arrayOne = []
          var isTempOne = res.data.result.result[0][0]
          var nameTitleOne = ''
          for (let i = 0; i < res.data.result.result.length; i++) {
            var sonArrayOne = []
            if (res.data.result.result[i][0] == isTempOne) {
              sonArrayOne[0] = res.data.result.result[i][1]
              sonArrayOne[1] = res.data.result.result[i][2]
              arrayOne.push(sonArrayOne)
              if (i == res.data.result.result.length - 1) {
                nameTitleOne = '牌号:' + this.tableRow.grade + '; 温度/Cel.Deg:' + isTempOne + '℃; 测量值'
                this.fittingOption.series.push({
                  name: nameTitleOne,
                  data: arrayOne,
                  type: 'line',
                  smooth: true
                })
                this.fittingOption.legend.data.push(nameTitleOne)
                this.fittingOption.legend.data.push('\n')
              }
            } else if (res.data.result.result[i][0] != isTempOne) {
              nameTitleOne = '牌号:' + this.tableRow.grade + '; 温度/Cel.Deg:' + isTempOne + '℃; 测量值'
              this.fittingOption.series.push({
                name: nameTitleOne,
                data: arrayOne,
                type: 'line',
                smooth: true
              })
              this.fittingOption.legend.data.push(nameTitleOne)
              this.fittingOption.legend.data.push('\n')
              arrayOne = []
              isTempOne = res.data.result.result[i][0]
              i--
            }
          }

          var arrayTwo = []
          var isTempTwo = res.data.result.result[0][0]
          var nameTitleTwo = ''
          for (let i = 0; i < res.data.result.result.length; i++) {
            var sonArrayTwo = []
            if (res.data.result.result[i][0] == isTempTwo) {
              sonArrayTwo[0] = res.data.result.result[i][1]
              sonArrayTwo[1] = res.data.result.result[i][3]
              arrayTwo.push(sonArrayTwo)
              if (i == res.data.result.result.length - 1) {
                nameTitleTwo = '牌号:' + this.tableRow.grade + '; 温度/Cel.Deg:' + isTempTwo + '℃; 拟合值'
                this.fittingOption.series.push({
                  name: nameTitleTwo,
                  data: arrayTwo,
                  type: 'line',
                  smooth: true
                })
                this.fittingOption.legend.data.push(nameTitleTwo)
                this.fittingOption.legend.data.push('\n')
              }
            } else if (res.data.result.result[i][0] != isTempTwo) {
              nameTitleTwo = '牌号:' + this.tableRow.grade + '; 温度/Cel.Deg:' + isTempTwo + '℃; 拟合值'
              this.fittingOption.series.push({
                name: nameTitleTwo,
                data: arrayTwo,
                type: 'line',
                smooth: true
              })
              this.fittingOption.legend.data.push(nameTitleTwo)
              this.fittingOption.legend.data.push('\n')
              arrayTwo = []
              isTempTwo = res.data.result.result[i][0]
              i--
            }
          }

          this.fittingChart = echarts.init(document.getElementById('fittingMain'))
          this.fittingChart.setOption(this.fittingOption)
        })
      }
    },
    saveParameters() { },
    modelDescription() { },
    /*************** 曲线拟合 *********************/

    /*---------------------echarts转图片传后端并接受后端文件流下载文件--------------------- */
    echartsdownload(row) {
      if (this.currentCheckedNum == 1) {
        if (row.id !== this.hideSelection[0].id) {
          Message({
            message: '请点击已勾选数据的下载测试报告按钮！',
            type: 'warning',
            center: true,
            customClass: 'mzindex'
          })
        } else {
          /****** 加载等待函数 *******/
          this.loading = this.$loading({
            lock: true,
            text: 'Loading',
            spinner: 'el-icon-loading',
            background: 'rgba(0, 0, 0, 0.7)'
          })
          /****** 加载等待函数 *******/
          this.timer = setTimeout(() => {
            let mycanvas = document.getElementsByTagName('canvas')[0]
            let dataURL = mycanvas.toDataURL('image/png')
            let a = document.createElement('a')
            a.setAttribute('href', dataURL)
            a.setAttribute('download', 'echarts图片下载.png')
            // let mycanvas = document.getElementsByTagName('canvas')[0]
            // let dataURL = mycanvas.toDataURL('image/png')
            // let a = document.createElement('a')
            // a.setAttribute('href', dataURL)
            // a.setAttribute('download', 'echarts图片下载.png')
            // a.click()
            this.UpBase64Img(dataURL, row)
          }, 1500)
        }
      } else if (this.currentCheckedNum == 0) {
        Message({
          message: '请先勾选数据生成图表，再下载测试报告',
          type: 'warning',
          center: true,
          customClass: 'mzindex'
        })
      } else {
        Message({
          message: '请先取消多选，再下载测试报告',
          type: 'warning',
          center: true,
          customClass: 'mzindex'
        })
      }
    },
    //base64编码图片转换成file对象
    dataURLtoFile(dataurl, filename) {
      var arr = dataurl.split(',')
      var mime = arr[0].match(/:(.*?);/)[1] //base64解析出来的图片类型
      var bstr = atob(arr[1]) //对base64串进行操作，去掉url头，并转换为byte   atob为window内置方法
      var n = bstr.length
      var u8arr = new Uint8Array(n)
      while (n--) {
        u8arr[n] = bstr.charCodeAt(n)
      }
      // 创建新的 File 对象实例[utf-8内容，文件名称或者路径，[可选参数，type：文件中的内容mime类型]]
      return new File([u8arr], filename, { type: mime })
    },
    UpBase64Img(dataurl, row) {
      var formData = new FormData()
      var type = ''
      if (this.importDataType == '软磁性能') {
        type = '软磁'
      } else if (this.importDataType == '永磁性能') {
        type = '永磁'
      } else if (this.importDataType == '导电性能') {
        type = '导电'
      } else if (this.importDataType == '传热性能') {
        type = '传热'
      } else if (this.importDataType == '机械性能') {
        type = '机械'
      } else if (this.importDataType == "磁致伸缩") {
        type = "磁致伸缩"
      }
      formData.append('file', this.dataURLtoFile(dataurl, 'tupian.png'))
      formData.append('parameterType', type + '样品基本参数')
      formData.append('type', type + this.conditionInfo.timeTypes + this.conditionInfo.curveTypes)
      formData.append('id', this.tableRow.id)
      formData.append('dataId', row.id)
      formData.append('userId', JSON.parse(window.localStorage.getItem('pro__Login_Userinfo')).value.id)
      formData.append('filename', row.fileName)
      formData.append('grade', this.tableRow.grade)
      formData.append('parameterId', this.tableRow.parameterId)
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: `/user/report`,
        method: 'POST',
        data: formData,
        responseType: 'blob' // 表明返回服务器返回的数据类型
      }).then(res => {
        this.loading.close()
        let blob = new Blob([res.data], {
          type: 'application/msword'
        })
        let fileName = '测试报告.docx'
        if (window.navigator.msSaveOrOpenBlob) {
          navigator.msSaveBlob(blob, fileName)
        } else {
          var link = document.createElement('a')
          link.href = window.URL.createObjectURL(blob)
          link.download = fileName
          link.click()
          //释放内存
          window.URL.revokeObjectURL(link.href)
        }
      })
    },
    /*---------------------echarts转图片传后端并接受后端文件流下载文件--------------------- */

    /*************** 收藏相关函数  *********************/
    collect(row) {
      this.collectVisible = true
      this.collectinformation = row
    },
    confirmCollect() {
      var type = ''
      if (this.importDataType == '软磁性能') {
        type = '软磁'
      } else if (this.importDataType == '永磁性能') {
        type = '永磁'
      } else if (this.importDataType == '导电性能') {
        type = '导电'
      } else if (this.importDataType == '传热性能') {
        type = '传热'
      } else if (this.importDataType == '机械性能') {
        type = '机械'
      } else if (this.importDataType == "磁致伸缩性能") {
        type = "磁致伸缩"
      }
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: '/collectTable/collect',
        method: 'POST',
        data: {
          userId: JSON.parse(window.localStorage.getItem('pro__Login_Userinfo')).value.id,
          username: JSON.parse(window.localStorage.getItem('pro__Login_Userinfo')).value.username,
          measurementType: type + this.conditionInfo.timeTypes + this.conditionInfo.curveTypes,
          measurementId: this.collectinformation.id,
          specification: this.tableRow.specification,
          parameterNum: this.tableRow.parameterId,
          parameterId: this.tableRow.id,
          grade: this.tableRow.grade,
          parameterType: type + '样品基本参数',
          name: this.collectinSupplement
        }
      }).then(res => {
        if (res.data.code == 200) {
          this.collectVisible = false
          this.collectinSupplement = ''
          Message({
            message: res.data.message,
            type: 'success',
            center: true,
            customClass: 'mzindex'
          })
        } else if (res.data.code == 500) {
          this.collectVisible = false
          this.collectinSupplement = ''
          Message({
            message: res.data.message,
            type: 'error',
            center: true,
            customClass: 'mzindex'
          })
        }
      })
    },
    closeCollect() {
      this.collectVisible = false
      this.collectinSupplement = ''
    },
    /*************** 收藏相关函数  *********************/

    // 导出测量条件按钮
    exportMeaCond() {
      /****** 加载等待函数 *******/
      const loading = this.$loading({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      })
      /****** 加载等待函数 *******/

      var materialTypeData
      var nameTypeData
      if (this.importDataType == '软磁性能') {
        materialTypeData = '软磁样品基本参数'
        nameTypeData = '软磁' + this.conditionInfo.timeTypes + this.conditionInfo.curveTypes
      } else if (this.importDataType == '永磁性能') {
        materialTypeData = '永磁样品基本参数'
        nameTypeData = '永磁' + this.conditionInfo.timeTypes + this.conditionInfo.curveTypes
      } else if (this.importDataType == '导电性能') {
        materialTypeData = '导电样品基本参数'
        nameTypeData = '导电' + this.conditionInfo.timeTypes + this.conditionInfo.curveTypes
      } else if (this.importDataType == '传热性能') {
        materialTypeData = '传热样品基本参数'
        nameTypeData = '传热' + this.conditionInfo.timeTypes + this.conditionInfo.curveTypes
      } else if (this.importDataType == '机械性能') {
        materialTypeData = '机械样品基本参数'
        nameTypeData = '机械' + this.conditionInfo.timeTypes + this.conditionInfo.curveTypes
      } else if (this.importDataType == "磁致伸缩性能") {
        materialTypeData = '机磁致伸缩样品基本参数'
        nameTypeData = '磁致伸缩械' + this.conditionInfo.timeTypes + this.conditionInfo.curveTypes
      }
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: '/ExportData/downloadParameterByUser',
        method: 'post',
        responseType: 'blob', // 表明返回服务器返回的数据类型
        data: {
          materialType: materialTypeData,
          id: this.tableRow.id,
          nameType: nameTypeData,
          measurementIdList: this.arr
        }
      }).then(res => {
        loading.close()
        let blob = new Blob([res.data], {
          type: 'application/vnd.ms-excel'
        })
        let fileName = '测量条件数据.xlsx'
        if (window.navigator.msSaveOrOpenBlob) {
          navigator.msSaveBlob(blob, fileName)
        } else {
          var link = document.createElement('a')
          link.href = window.URL.createObjectURL(blob)
          link.download = fileName
          link.click()
          //释放内存
          window.URL.revokeObjectURL(link.href)
        }
      })
    },
    // 从父组件获取数据
    getDataFromUp(conditionInfo, sampleSize) {
      console.log("父组件获取数据", conditionInfo)
      console.log("都组件获取samplesize", sampleSize)
      this.conditionInfo = {
        curveTypes: '',
        timeTypes: '',
        productId: conditionInfo.productId
      }
      this.sampleSize = sampleSize
      this.total1 = 0
      this.curve = ''
      this.display = ''
      this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
      this.measuConditionsData = []
    },

    //曲线类型选择判断
    judge(curve, display, type) {
      this.curve = curve
      this.display = display
      this.conditionInfo.curveTypes = curve
      this.conditionInfo.timeTypes = display
      this.showGraph()
      this.curveType = type
    },

    showGraph() {
      if (this.importDataType == '软磁性能') {
        if (this.conditionInfo.curveTypes == '' || this.conditionInfo.timeTypes == '' || this.sampleSize == '') {
          return false
        } else if (this.conditionInfo.curveTypes == '原始波形' && this.conditionInfo.timeTypes == '静态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[0] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.staticOriginalWave[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.staticOriginalWave[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.staticOriginalWave[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.staticOriginalWave[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.staticOriginalWave[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.staticOriginalWave[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.staticOriginalWave[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.staticOriginalWave[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.staticOriginalWave[8]
          }
        } else if (this.conditionInfo.curveTypes == '磁化曲线' && this.conditionInfo.timeTypes == '静态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[1] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.staticMagnetizingCurve[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.staticMagnetizingCurve[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.staticMagnetizingCurve[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.staticMagnetizingCurve[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.staticMagnetizingCurve[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.staticMagnetizingCurve[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.staticMagnetizingCurve[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.staticMagnetizingCurve[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.staticMagnetizingCurve[8]
          }
        } else if (this.conditionInfo.curveTypes == '磁滞回线' && this.conditionInfo.timeTypes == '静态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[2] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.staticHysteresisLoop[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.staticHysteresisLoop[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.staticHysteresisLoop[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.staticHysteresisLoop[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.staticHysteresisLoop[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.staticHysteresisLoop[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.staticHysteresisLoop[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.staticHysteresisLoop[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.staticHysteresisLoop[8]
          }
        } else if (this.conditionInfo.curveTypes == '铁损曲线' && this.conditionInfo.timeTypes == '静态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[3] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.staticIronLossCurve[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.staticIronLossCurve[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.staticIronLossCurve[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.staticIronLossCurve[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.staticIronLossCurve[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.staticIronLossCurve[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.staticIronLossCurve[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.staticIronLossCurve[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.staticIronLossCurve[8]
          }
        } else if (this.conditionInfo.curveTypes == '原始波形' && this.conditionInfo.timeTypes == '动态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[4] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.dynamicOriginalWave[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.dynamicOriginalWave[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.dynamicOriginalWave[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.dynamicOriginalWave[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.dynamicOriginalWave[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.dynamicOriginalWave[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.dynamicOriginalWave[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.dynamicOriginalWave[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.dynamicOriginalWave[8]
          }
        } else if (this.conditionInfo.curveTypes == '磁化曲线' && this.conditionInfo.timeTypes == '动态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[5] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.dynamicMagnetizingCurve[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.dynamicMagnetizingCurve[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.dynamicMagnetizingCurve[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.dynamicMagnetizingCurve[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.dynamicMagnetizingCurve[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.dynamicMagnetizingCurve[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.dynamicMagnetizingCurve[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.dynamicMagnetizingCurve[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.dynamicMagnetizingCurve[8]
          }
        } else if (this.conditionInfo.curveTypes == '磁滞回线' && this.conditionInfo.timeTypes == '动态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[6] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.dynamicHysteresisLoop[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.dynamicHysteresisLoop[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.dynamicHysteresisLoop[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.dynamicHysteresisLoop[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.dynamicHysteresisLoop[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.dynamicHysteresisLoop[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.dynamicHysteresisLoop[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.dynamicHysteresisLoop[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.dynamicHysteresisLoop[8]
          }
        } else if (this.conditionInfo.curveTypes == '铁损曲线' && this.conditionInfo.timeTypes == '动态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[7] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.dynamicIronLossCurve[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.dynamicIronLossCurve[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.dynamicIronLossCurve[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.dynamicIronLossCurve[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.dynamicIronLossCurve[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.dynamicIronLossCurve[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.dynamicIronLossCurve[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.dynamicIronLossCurve[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.dynamicIronLossCurve[8]
          }
        } else {
          return false
        }
        this.getCondition()
      } else if (this.importDataType == '永磁性能') {
        if (this.conditionInfo.curveTypes !== '' && this.conditionInfo.timeTypes !== '' && this.conditionInfo.productId !== '') {
          this.getCondition()
        }
      } else if (this.importDataType == '导电性能') {
        if (this.conditionInfo.curveTypes !== '' && this.conditionInfo.timeTypes !== '' && this.conditionInfo.productId !== '') {
          this.getCondition()
        }
      } else if (this.importDataType == '传热性能') {
        if (this.conditionInfo.curveTypes !== '' && this.conditionInfo.timeTypes !== '' && this.conditionInfo.productId !== '') {
          this.getCondition()
        }
      } else if (this.importDataType == '机械性能') {
        if (this.conditionInfo.curveTypes !== '' && this.conditionInfo.timeTypes !== '' && this.conditionInfo.productId !== '') {
          this.getCondition()
        }
      } else if (this.importDataType == '磁致伸缩性能') {
        if (this.conditionInfo.curveTypes !== '' && this.conditionInfo.timeTypes !== '' && this.conditionInfo.productId !== '') {
          this.getCondition()
        }
      }
    },
    /*************分页函数**************/
    handleSizeChange1(newSize) {
      this.pageVo.pageSize = newSize
      this.getCondition()
    },
    handleCurrentChange1(newPage) {
      this.pageVo.pageNum = newPage
      this.getCondition()
    },
    /*************分页函数**************/

    //获取测量条件
    getCondition() {
      console.log(">>>>>>>>>>>>>>>>>", this.importDataType)
      var dataMessage = {}
      var condition = {}
      if (this.importDataType == '软磁性能') {
        condition.curveTypes = '软磁' + this.conditionInfo.timeTypes + this.conditionInfo.curveTypes
        condition.productId = this.conditionInfo.productId
        dataMessage.conditionVo = condition
        dataMessage.pageVo = this.pageVo
        dataMessage.userId = JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value.id,
          this.axios({
            baseURL: 'http://59.172.104.174:30669',
            url: '/productParameter/getParameter',
            method: 'post',
            data: dataMessage
          }).then(res => {
            if (res.data.code == 501) {
              this.measuConditionsData = []
              Message({
                message: '暂无权限！',
                type: 'warning',
                center: true,
                customClass: 'mzindex',
              })
              return
            } else {
              this.measuConditionsData = []
              this.measuConditionsData = res.data.result.data
              this.oldTableData = JSON.parse(JSON.stringify(this.measuConditionsData))
              this.tempDatalist = JSON.parse(JSON.stringify(this.measuConditionsData)) //用于后面如果要恢复隐藏的数据使用
            }
          })
      } else if (this.importDataType == '永磁性能') {
        condition.curveTypes = '永磁' + this.conditionInfo.timeTypes + this.conditionInfo.curveTypes
        condition.productId = this.conditionInfo.productId
        dataMessage.conditionVo = condition
        dataMessage.pageVo = this.pageVo
        dataMessage.userId = JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value.id,
          this.axios({
            baseURL: 'http://59.172.104.174:30669',
            url: '/measurement/getParameter',
            method: 'post',
            data: dataMessage
          }).then(res => {
            if (res.data.code == 501) {
              this.measuConditionsData = []
              Message({
                message: '暂无权限！',
                type: 'warning',
                center: true,
                customClass: 'mzindex',
              })
              return
            } else {
              this.measuConditionsData = []
              this.measuConditionsData = res.data.result
              this.oldTableData = JSON.parse(JSON.stringify(this.measuConditionsData))
              this.tempDatalist = JSON.parse(JSON.stringify(this.measuConditionsData)) //用于后面如果要恢复隐藏的数据使用
            }
          })
      } else if (this.importDataType == '导电性能') {
        condition.curveTypes = '导电' + this.conditionInfo.timeTypes + this.conditionInfo.curveTypes
        condition.productId = this.conditionInfo.productId
        dataMessage.conditionVo = condition
        dataMessage.pageVo = this.pageVo
        dataMessage.userId = JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value.id,
          this.axios({
            baseURL: 'http://59.172.104.174:30669',
            url: '/eleMeasurement/getParameter',
            method: 'post',
            data: dataMessage
          }).then(res => {
            if (res.data.code == 501) {
              this.measuConditionsData = []
              Message({
                message: '暂无权限！',
                type: 'warning',
                center: true,
                customClass: 'mzindex',
              })
              return
            } else {
              this.measuConditionsData = []
              this.measuConditionsData = res.data.result
              this.oldTableData = JSON.parse(JSON.stringify(this.measuConditionsData))
              this.tempDatalist = JSON.parse(JSON.stringify(this.measuConditionsData)) //用于后面如果要恢复隐藏的数据使用
            }
          })
      } else if (this.importDataType == '传热性能') {
        condition.curveTypes = this.conditionInfo.timeTypes + this.conditionInfo.curveTypes
        condition.productId = this.conditionInfo.productId
        dataMessage.conditionVo = condition
        dataMessage.pageVo = this.pageVo
        dataMessage.userId = JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value.id,
          this.axios({
            baseURL: 'http://59.172.104.174:30669',
            url: '/chuanre/heattransfer-parameter/selectTestCondition',
            method: 'post',
            data: dataMessage
          }).then(res => {
            // if(res.data.code == 501) {
            //   this.measuConditionsData = []
            //   Message({
            //     message: '暂无权限！',
            //     type: 'warning',
            //     center: true,
            //     customClass: 'mzindex',
            //   })
            //   return
            // } else {
            this.measuConditionsData = []
            this.measuConditionsData = res.data.result.data
            this.oldTableData = JSON.parse(JSON.stringify(this.measuConditionsData))
            this.tempDatalist = JSON.parse(JSON.stringify(this.measuConditionsData)) //用于后面如果要恢复隐藏的数据使用
            // }
          })
      } else if (this.importDataType == '机械性能') {
        var dataMessage = {}
        var condition = {}
        condition.curveTypes = this.conditionInfo.timeTypes + this.conditionInfo.curveTypes
        condition.productId = this.conditionInfo.productId
        dataMessage.conditionVo = condition
        dataMessage.pageVo = this.pageVo
        dataMessage.userId = JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value.id,
          console.log("dataMessage", dataMessage)
        this.axios({
          baseURL: 'http://59.172.104.174:30669',
          url: '/machine/machine-parameter/selectTestCondition',
          method: 'post',
          data: dataMessage,
        }).then((res) => {
          console.log("res", res)
          this.measuConditionsData = []
          this.measuConditionsData = res.data.result.data
          this.oldTableData = JSON.parse(JSON.stringify(this.measuConditionsData))
          this.tempDatalist = JSON.parse(JSON.stringify(this.measuConditionsData)) //用于后面如果要恢复隐藏的数据使用
        })
      } else if (this.importDataType == "磁致伸缩性能") {
        var dataMessage = {}
        var condition = {}
        condition.curveTypes = this.conditionInfo.timeTypes + this.conditionInfo.curveTypes
        condition.productId = this.conditionInfo.productId
        dataMessage.conditionVo = condition
        dataMessage.pageVo = this.pageVo
        console.log("dataMessage", dataMessage)
        this.axios({
          baseURL: 'http://59.172.104.174:30669',
          url: '/cizhi/magnetostriction-parameter/selectTestCondition',
          method: 'post',
          data: dataMessage,
        }).then((res) => {
          this.measuConditionsData = []
          this.measuConditionsData = res.data.result.data
          this.oldTableData = JSON.parse(JSON.stringify(this.measuConditionsData))
          this.tempDatalist = JSON.parse(JSON.stringify(this.measuConditionsData)) //用于后面如果要恢复隐藏的数据使用
        })
      }
    },
    getEchartsLegend(rows) {
      console.log("进入echarts绘图")
      this.hideSelection = []
      this.hideSelection = rows
      this.currentCheckedNum = rows.length
      // this.GraphOption.series = []
      if (rows.length == 0) {
        this.exportMeaCondFlag = true
      } else if (rows.length == 10) {
        Message({ message: '总共已勾选10条数据,不能继续勾选更多数据', type: 'warning' })
        this.exportMeaCondFlag = false
      } else if (rows.length > 10) {
        Message({ message: '勾选超过10条数据,勾选无效,请取消勾选', type: 'error' })
        this.exportMeaCondFlag = true
        return false
      } else {
        this.exportMeaCondFlag = false
      }
      this.arr = rows.map(x => {
        this.exportMeasureDataId = x.id
        return x.id
      })

      //通过ref获取el-table的表头数据
      var childrenData = {}
      if (this.$refs.measureTableYC !== undefined) {
        childrenData = this.$refs.measureTableYC.$children[0].$children
      } else if (this.$refs.measureTableDD !== undefined) {
        childrenData = this.$refs.measureTableDD.$children[0].$children
      } else if (this.$refs.measureTableDR !== undefined) {
        childrenData = this.$refs.measureTableDR.$children[0].$children
      } else {
        var measureTableNum = ''
        for (let i = 0; i < this.tableVisiable.length; i++) {
          if (this.tableVisiable[i] == 1) {
            measureTableNum = i
          }
        }
        var measureTableName = 'measureTable' + measureTableNum
        childrenData = this.$refs[measureTableName].$children[0].$children
      }
      var columnTitle = []
      var columnTitle = childrenData
        .filter(x => {
          return x._props.prop !== undefined
        })
        .map(x => {
          return new Object({
            prop: x._props.prop,
            label: x._props.label
          })
        })
      var nameTitle = rows.map(x => {
        let addTitle = ''
        for (let i = 0; i < columnTitle.length; i++) {
          addTitle = addTitle + columnTitle[i].label + ':' + x[`${columnTitle[i].prop}`] + ','
        }
        return addTitle
      })
      this.$emit('echartsLegend', this.arr, rows, nameTitle, this.exportMeasureDataId, this.conditionInfo)
    },
    downloadAttachment(dataName) {
      console.log('dataName----', dataName)
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: '/attachmentUpload/downLoadAttachmentFile',
        method: 'GET',
        params: {
          filename: dataName
        },
        responseType: 'blob' // 表明返回服务器返回的数据类型
      }).then(res => {
        let blob = new Blob([res.data])
        let fileName = dataName
        if (window.navigator.msSaveOrOpenBlob) {
          navigator.msSaveBlob(blob, fileName)
        } else {
          var link = document.createElement('a')
          link.href = window.URL.createObjectURL(blob)
          link.download = fileName
          link.click()
          //释放内存
          window.URL.revokeObjectURL(link.href)
        }
      })
    },
    downLoadFileName(dataName) {
      console.log('dataName', dataName)
      if (dataName == '未知' || dataName == '') {
        Message({
          message: '数据库暂未收录该消息，欢迎使用附件上传',
          type: 'warning',
          center: true,
          customClass: 'mzindex',
        })
        return
      }
      this.axios({
        baseURL: 'http://59.172.104.174:31770',
        url: '/basicsExecutionStandard/getFilenameByNumber',
        method: 'GET',
        params: {
          number: dataName
        },
      }).then(res => {
        console.log('res----', res.data.result.filename)
        if (res.data.result.filename != '' && res.data.result.filename != null) {
          this.downloadAttachment(res.data.result.filename)
        } else {
          Message({
            message: '数据库暂未收录该消息，欢迎使用附件上传',
            type: 'warning',
            center: true,
            customClass: 'mzindex',
          })
        }
      })
    },
    // 是否为管理员身份 ———— 判断能否删除评论的依据之一
    isAdminRoleConfirm() {
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        method: 'GET',
        url: '/systemmanagement/user/getUserRoleCode',
        params: {
          userId: JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value.id,
        }
      }).then(res => {
        if (res.data.data.roleCode == 'admin') {
          this.isAdminRole = true
        } else {
          this.isAdminRole = false
        }
      })
    },
  }
}
</script>

<style></style>
